#include "widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
{
    QToolBar *toolbar = new QToolBar(this);
    QAction *act[2];

    act[0] = new QAction("Browser",this);
    act[1] = new QAction("Calendar",this);

    act[0]->setShortcut(Qt::Key_Control|Qt::Key_E);
    act[0]->setToolTip("This is a ToolTip.");

    for(int i=0;i<2;i++){
        toolbar->addAction(act[i]);
    }


    connect(act[0],SIGNAL(triggered()),this,SLOT(trigger()));

}

Widget::~Widget()
{
}

void Widget::trigger(){
    qDebug("Tool Button 1 click.");
}


